<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Classificados 1,99</title>
	<f:facet name="last">
		<h:outputStylesheet library="css" name="bootstrap.min.css" />
		<h:outputStylesheet library="css" name="bootstrap-theme.min.css" />

	</f:facet>
</h:head>
<h:body>
	<div class="container">
		<h1>
			<h:outputText value="Novo anúncio"
				rendered="#{param.anuncio == null}"></h:outputText>
			<h:outputText value="Editar anúncio"
				rendered="#{param.anuncio != null}"></h:outputText>
		</h1>
		<h:form>
			<h:panelGrid columns="2">
				<h:outputLabel value="Titulo" />
				<h:inputText value="#{anunciosBean.anuncio.titulo}" />
				<h:outputLabel value="Descrição" />
				<h:inputTextarea value="#{anunciosBean.anuncio.titulo}" />
				<h:outputLabel value="Data" />
				<h:inputText value="#{anunciosBean.anuncio.data}">
					<f:convertDateTime pattern="dd/MM/yyyy" />
				</h:inputText>
				<h:outputLabel/>
				<h:commandButton value="Salvar" action="#{anunciosBean.salvarAnuncio}"/>
			</h:panelGrid>

		</h:form>

	</div>

	<h:outputScript name="bootstrap.min.js" library="js" />
</h:body>
</html>